<style>
    .panel-statistics h4 {
        color: #666;
        font-weight: bold;
        font-size: 14px;
    }

    .panel-statistics h3 {
        font-weight: 500;
        font-size: 12px;
        color: #333;
    }
    .panel-statistics h3 span {
        font-size: 30px;
    }

    .panel-statistics em {
        font-style: normal;
    }

    .panel-statistics .pull-right {
        padding-right: 10px;
    }

    .panel-statistics .table thead tr th {
        font-weight: normal;
    }

    .panel-statistics .table tbody tr td {
        font-weight: normal;
        vertical-align: middle;
    }

    .panel-statistics .table tbody tr td p {
        margin: 0;
    }

    #echarts1 textarea {
        display: block;
    }

    select.model_id {
        min-width: 60px;
    }
    .fa-8x{
        font-size: 8em;
    }

    .nav > li > a {
        padding: 5px 5px 0px 5px;
    }
    .panel-intro > .panel-heading .nav-tabs > li > a {
        margin-right: 0;
        color: #0d0d0d;
    }
    .fixed-table-toolbar{
        display: none;
    }
    .progress-bar {
        color: #020202;
        background-image: linear-gradient(to right, #4969e6, #1ac6f2);
    }

      .sm-st {
          background: #fff;
          padding: 20px;
          -webkit-border-radius: 3px;
          -moz-border-radius: 3px;
          border-radius: 3px;
          margin-bottom: 20px;
      }

    .sm-st-icon {
        width: 60px;
        height: 60px;
        display: inline-block;
        line-height: 60px;
        text-align: center;
        font-size: 30px;
        background: #eee;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        border-radius: 5px;
        float: left;
        margin-right: 10px;
        color: #fff;
    }

    .sm-st-info {
        padding-top: 2px;
    }

    .sm-st-info span {
        display: block;
        font-size: 24px;
        font-weight: 600;
    }

    .orange {
        background: #fa8564 !important;
    }

    .tar {
        background: #45cf95 !important;
    }

    .sm-st .green {
        background: #86ba41 !important;
    }

    .pink {
        background: #AC75F0 !important;
    }

    .yellow-b {
        background: #fdd752 !important;
    }

    .stat-elem {

        background-color: #fff;
        padding: 18px;
        border-radius: 40px;

    }

    .stat-info {
        text-align: center;
        background-color: #fff;
        border-radius: 5px;
        margin-top: -5px;
        padding: 8px;
        -webkit-box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
        font-style: italic;
    }

    .stat-icon {
        text-align: center;
        margin-bottom: 5px;
    }

    .st-red {
        background-color: #F05050;
    }

    .st-green {
        background-color: #27C24C;
    }

    .st-violet {
        background-color: #7266ba;
    }

    .st-blue {
        background-color: #23b7e5;
    }

    .stats .stat-icon {
        color: #28bb9c;
        display: inline-block;
        font-size: 26px;
        text-align: center;
        vertical-align: middle;
        width: 50px;
        float: left;
    }

    .stat {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
    }

    .stat .value {
        font-size: 20px;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 500;
    }

    .stat .name {
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 5px 0;
    }

    .stat.lg .value {
        font-size: 26px;
        line-height: 28px;
    }

    .stat-col {
        margin:0 0 10px 0;
    }
    .stat.lg .name {
        font-size: 16px;
    }




    .item {
        padding: 30px 0;
    }


    #statistics .panel {
        min-height: 150px;
    }

    #statistics .panel h5 {
        font-size: 14px;
    }
    .sm-st {
        background: #fff;
        padding: 20px;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        margin-bottom: 20px;
        -webkit-box-shadow: 0 1px 0px rgb(0 0 0 / 5%);
        box-shadow: 0 1px 0px rgb(0 0 0 / 5%);
    }

</style>





<div class="row" >

    <div class="col-xs-12">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">

                <h4>{:__('总体分析(项目金额按项目完成时间统计)')}</h4>
                <div id="datefilter">

                    <form id="form1" action="" role="form" novalidate class="form-inline">
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('Today')}</a>
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('Yesterday')}</a>
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('Last 7 Days')}</a>
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('Last 30 Days')}</a>
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('Last month')}</a>
                        <a href="javascript:;" class="btn btn-success btn-filter">{:__('This month')}</a>

                        <div class="input-group">
                            {:build_select('c-group_id', $groupdata, null, ['class'=>'form-control selectpicker', 'id'=>'c-group_id'])}
                        </div>
                        <input id="c-owner_user_id"  data-source="workteam/common/selectpage?model=admin" data-field="nickname"
                               class="form-control selectpage" name="row[owner_user_id]" type="text" value="" placeholder="{:__('选择项目负责人')}">

                        <div class="input-group">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                            <input type="text" class="form-control input-inline datetimerange datetimerange1" placeholder="{:__('指定日期')}" style="width:270px;"
                                   data-type="hours" data-url="{:url('workteam/analysis.project/index',['ajax'=>1])}" />
                        </div>
                    </form>
                </div>

                <div class="col-xs-12 col-sm-6">
                    <div id="hours-echart" style="height:400px;width:100%;margin-top:15px;"></div>
                </div>
                <div class="col-xs-12 col-sm-6">
                    <div id="hours-echart2" style="height:400px;width:100%;margin-top:15px;"></div>
                </div>

                <div class="">

                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <span class="sm-st-icon st-blue"><i class="fa fa-terminal"></i></span>
                            <div class="sm-st-info">
                                <span class="text-danger count_expenses">{$count_expenses}</span>
                                {:__("支出金额")}
                            </div>
                        </div>
                    </div>

                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <span class="sm-st-icon st-red"><i class="fa fa-cny"></i></span>
                            <div class="sm-st-info">
                                <span class="text-success count_price">{$count_price}</span>
                                {:__("项目金额")}
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <span class="sm-st-icon st-violet"><i class="fa fa-paste"></i></span>
                            <div class="sm-st-info">
                                <span class="price-expenses">{$count_price+$count_expenses}</span>
                                {:__("收支差额")}                            </div>
                        </div>
                    </div>

                    <div class="col-sm-3 col-xs-6">
                        <div class="sm-st clearfix">
                            <span class="sm-st-icon st-green"><i class="fa fa-book"></i></span>
                            <div class="sm-st-info">
                                <span class="count_project">{$count_project}</span>
                                {:__("完成项目")}                            </div>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>


</div>




<div class="row" style="margin-top:20px;" >
    <div class="col-xs-12">
        <div class="panel panel-default panel-intro panel-statistics">
            <div class="panel-body">
                <h4>{:__('项目支出分析')}</h4>
                <div id="datefilter1">

                    <form id="form2" action="" role="form" novalidate class="form-inline">

                        <input id="c-project_id"  data-source="workteam/analysis.project/selectpage?model=project" data-field="name"
                               class="form-control selectpage" name="row[project_id]" type="text" value="" placeholder="{:__('选择项目')}">


                    </form>
                </div>

                <div class="col-xs-12 col-sm-6" style="margin-top:20px;" >

                    <div class="card sameheight-item stats">
                        <div class="card-block">
                            <div class="row row-sm stats-container">
                                <div class="col-xs-12 stat-col">
                                    <div class="stat-icon"><i class="fa fa-terminal"></i></div>
                                    <div class="stat">
                                        <div class="value" id="expenses"> {$paylog_echart['expenses']}</div>
                                        <div class="name"> 总支出</div>
                                    </div>
                                    <div class="progress">
                                        <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                    </div>
                                </div>
                                <div class="col-xs-12 stat-col">
                                    <div class="stat-icon"><i class="fa fa-cny"></i></div>
                                    <div class="stat">
                                        <div class="value" id="p_price"> {$paylog_echart['p_price']}</div>
                                        <div class="name"> 项目金额</div>
                                    </div>
                                    <div class="progress">
                                        <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                    </div>
                                </div>
                                <div class="col-xs-12  stat-col">
                                    <div class="stat-icon"><i class="fa fa-paste"></i></div>
                                    <div class="stat">
                                        <div class="value" id="p_difference"> {$paylog_echart['expenses']+$paylog_echart['p_price']}</div>
                                        <div class="name"> 收支差额</div>
                                    </div>
                                    <div class="progress">
                                        <div class="progress-bar progress-bar-success" style="width: 20%"></div>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>

                <div class="col-xs-12 col-sm-6">
                    <div id="pay-echart" style="height:400px;width:100%;margin-top:15px;"></div>
                </div>

            </div>
        </div>
    </div>

</div>


<script>
    var Echartdata = {:json_encode($erchart)};
    var log_echart = {:json_encode($log_echart)};
    var paylog_echart = {:json_encode($paylog_echart['log_echart'])};
</script>